<!DOCTYPE html>
<html lang="zh-CN">
<#import  "/spring.ftl" as sp  />
<#import "../bingo.ftl" as bo />
<#assign base=request.contextPath />

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0">
    <base id="base" href="${base}">
    <!-- Bootstrap -->
    <link href="${base}/plugin/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- editorMd-->
    <link rel="stylesheet" href="${base}/plugin/editor/css/editormd.min.css"/>
    <link rel="stylesheet" href="${base}/css/bingo.css">
    <title><@sp.message code="blog.createPost"/></title>
</head>

<body>
<div class="container-fluid">
    <form action="/blog/create" method="post" class="form-horizontal">
    <@sp.formHiddenInput path="post.id"/>
    <@sp.formHiddenInput path="post.dates"/>
     <@sp.formTextarea path="post.excerpt" attributes='class="hide"'/>
        <div class="form-group">
            <label for="post.title" class="col-md-2 control-label"><@sp.message code="post.title"/></label>

            <div class="col-md-10">
            <@sp.formInput path="post.title" attributes='class="form-control"  placeholder="title"'/>
            </div>
        <@sp.showErrors ""/>
        </div>
        <div class="form-group">
            <label for="post.weather.location" class="col-md-2 control-label"><@sp.message code="post.weather.location"/></label>

            <div class="col-md-4">
            <@sp.formInput path="post.weather.location" attributes='readonly'/>
            </div>
            <label for="post.weather.weather" class="col-md-2 control-label"> <@sp.message code="post.weather.weather"/></label>

            <div class="col-md-4">
            <@sp.formInput path="post.weather.weather" attributes='readonly'/>
            </div>
        </div>
        <div class="form-group">
            <label for="post.keyword" class="col-md-2 control-label"><@sp.message code="post.keyword"/>
            </label>

            <div class="col-md-4">
            <@sp.formInput path="post.keyword"/>
            </div>
            <label for="post.tags" class="col-md-2 control-label"><@sp.message code="post.tags"/></label>

            <div class="col-md-4"><@sp.formInput path="post.tags"/></div>
        </div>
        <div class="form-group">
            <div class="col-md-4">
                <div>
                <@bo.formRadioButtons path="post.cStatus" options=CStatusList code="post.cStatus"/>
                </div>
                <div>
                <@bo.formRadioButtons path="post.pStatus" options=PStatusList code="post.pStatus"/>
                </div>
            </div>
            <div class="col-md-4">
                <input type="submit" id="createPost" value='<@sp.message code="blog.submit"/>' class="btn btn-default btn-lg col-md-5">
            </div>

        </div>
</div>


<div id="content_ed" class="form-group">
<@sp.message code="post.content"/>    <@sp.formTextarea path="post.content" attributes='class="postContent"'/>
        <@sp.showErrors "</br>"/>
</div>

</form>
</div>
<script src="${base}/plugin/jquery/jquery.min.js"></script>
<script src="${base}/plugin/editor/editormd.min.js"></script>
<script src="${base}/plugin/bootstrap/js/bootstrap.min.js"></script>
<script src="${base}/js/bingo.js"></script>
<script src="${base}/js/bingoDown.js"></script>
</body>
</html>